package com.whli.autumn.mall.sale.domain.dto.saleorderdtl;

import com.whli.autumn.core.extend.domain.dto.BaseAddDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * <p>销售订单明细新增参数</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-05-01 16:38
 */
@ApiModel(description = "销售订单明细新增参数")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SaleOrderDtlAddDTO extends BaseAddDTO {

    @ApiModelProperty(value = "销售订单")
    @NotBlank(message = "销售订单不能为空")
    private String saleOrderId;

    @ApiModelProperty(value = "商品信息")
    @NotBlank(message = "商品信息不能为空")
    private String productId;

    @ApiModelProperty(value = "商品分类")
    @NotBlank(message = "商品分类不能为空")
    private String productCategory;

    @ApiModelProperty(value = "商品编号")
    @NotBlank(message = "商品编号不能为空")
    private String productCode;

    @ApiModelProperty(value = "商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String productName;

    @ApiModelProperty(value = "商品规格")
    private String productSpec;

    @ApiModelProperty(value = "商品型号")
    private String productModel;

    @ApiModelProperty(value = "销售数量")
    @NotNull(message = "联系人不能为空")
    @DecimalMin(value = "0.01", message = "销售数量必须大于0")
    private BigDecimal saleQty;

}
